package com.cms.recursoshumanos.handler;

import com.cms.recursoshumanos.cache.UserInfoCache;
import com.cms.recursoshumanos.facade.ListaHospitalScreenFacade;

public class ListaHospitalScreenHandler extends BaseHandler

{
	
	public ListaHospitalScreenHandler()
	{
		
	}
	public void facadeListaHospitalScreen(String username, String password, int id_seguro, int decision)
	{
		ListaHospitalScreenFacade lista_hospital_facade = new ListaHospitalScreenFacade(username,
																						password,
																						id_seguro,
																						decision);
		lista_hospital_facade.getListaHospital();
		//lista_hospital_facade.run_facade(lista_hospital_facade);
	}
	public void refreshListaHospital (String username, String password, int id_seguro, int decision)
	{
		this.facadeListaHospitalScreen(username, password, id_seguro, decision);
	}
	public void getListaHospital (String username, String password, int id_seguro, int decision)
	{
				// si decision es ------->   1: Viene de la Ventana DetallePoliza
				//							 2: Viene de la Ventana Solicitud de Carta Aval
		if ( (!(UserInfoCache.getInstance().cache_utilizable(7)))
				|| UserInfoCache.getInstance().lista_vacia(7))
		{
			this.facadeListaHospitalScreen(username, password, id_seguro, decision);
		}
		else
		{
			this.goListaHospital();
		}
			
	}

}

